package com.ai3d.rfid.network.proxy

import com.ai3d.rfid.BuildConfig

/**
 * @ProjectName : Kolb
 * @Author : weijinsong
 * @Time : 2023/2/13 10:15
 * @Description : 文件描述
 */
object DnsProxy {
    //environment
    const val DEV_ENVIRONMENT = "dev"
    const val SIT_ENVIRONMENT = "sit"
    const val UAT_ENVIRONMENT = "uat"
    const val PROD_ENVIRONMENT = "prod"

    //api
    const val DEV_SERVER_API_URL = "https://disc-dev.icekredit.com/"
    const val SIT_SERVER_API_URL = "https://sit.api.sandieyun.com/"
    const val UAT_SERVER_API_URL = "https://disc-test.icekredit.com"
    const val PROD_SERVER_API_URL = "https://disc.icekredit.ai"

    //下载wss
    const val DEV_WSS_API_URL = "wss://dev.api.sandieyun.com/"
    const val SIT_WSS_API_URL = "wss://sit.api.sandieyun.com/"
    const val UAT_WSS_API_URL = "wss://uat.api.sandieyun.com/"
    const val PROD_WSS_API_URL = "wss://api.sandieyun.com/"

    fun getBaseApiUrl(): String {
        return when (BuildConfig.ENVIRONMENT) {
            DEV_ENVIRONMENT -> {
                DEV_SERVER_API_URL
            }
            SIT_ENVIRONMENT -> {
                SIT_SERVER_API_URL
            }
            UAT_ENVIRONMENT -> {
                UAT_SERVER_API_URL
            }
            PROD_ENVIRONMENT -> {
                PROD_SERVER_API_URL
            }
            else -> {
                PROD_SERVER_API_URL
            }
        }
    }

    fun getWSSApiUrl(): String {
        return when (BuildConfig.ENVIRONMENT) {
            DEV_ENVIRONMENT -> {
                DEV_WSS_API_URL
            }
            SIT_ENVIRONMENT -> {
                SIT_WSS_API_URL
            }
            UAT_ENVIRONMENT -> {
                UAT_WSS_API_URL
            }
            PROD_ENVIRONMENT -> {
                PROD_WSS_API_URL
            }
            else -> {
                PROD_WSS_API_URL
            }
        }
    }
}